<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    //函数传参 形参 加 实参
    function fn(num1, num2) {
      document.write(num1 + num2)
    }
    // let a = +prompt()
    // let b = +prompt()
    // fn(a,b)
    fn(+prompt(), +prompt())

    // alert('dasd')

    // function fn(){
    //   let a = +prompt()
    //   let b = +prompt()
    //   document.write(a+b)
    // }
    // fn()


  </script>
</body>

</html>